

#ifndef _POOLJOB_H_
#define _POOLJOB_H_	1

#include <Winsock.h>
#include "Communicator.h"
#include "HttpComm.h"
#include "httpcommon.h"

class CThreadPool;

//
// Abstract Class for Thread Job
//
class CPoolJob
{
	friend class CThreadPool;
public:
	virtual void			SetEngineData(ENGINE_DATA) = 0;
	virtual ENGINE_DATA		GetEngineData() = 0;

	virtual unsigned RunningJob() = 0;

protected:
	ENGINE_DATA	m_EngineData;
	CHttpComm	*m_pHttpComm;	//a pointer of an abstract class for CHttpComm. it'll be properly allocated to its own derived classes.
};


typedef enum _PROXY_MEMBER { CLIENT, PROXY, SERVER } PROXY_MEMBER;


//
// CPJNonControl class is used for making a connection non-controllable.
//
class CPJNonControl : public CPoolJob
{
public:
	CPJNonControl();			// Default Constructor
	CPJNonControl(CPJNonControl &);	// Copy Constructor

	// GET/SET Functions
	virtual void			SetEngineData(ENGINE_DATA);
	virtual ENGINE_DATA		GetEngineData();


private:
	virtual unsigned RunningJob();

	friend class CThreadPool;

public:

	// Operator Overloading
	CPJNonControl& operator =(const CPJNonControl &job);

private:
	

};




#endif